package com.foreveross.crawl.config;

import com.foreveross.crawl.common.cfg.ConfigContainer;
import com.foreveross.crawl.common.cfg.channels.KayakChannelPropertiesLoader;
import com.foreveross.crawl.common.cfg.channels.XieChengChannelPropertiesLoader;
import com.foreveross.crawl.common.cfg.city.CityPinyinProperties;
import com.foreveross.crawl.common.cfg.system.DefaultPropertiesLoader;
import com.foreveross.crawl.common.cfg.system.EnginePropertiesLoader;
import com.foreveross.crawl.common.cfg.system.SystemPropertiesLoader;
import com.foreveross.crawl.common.db.hbase.HBasePropertiesLoader;
import com.foreveross.proxyip.ProxyipProperties;
import com.foreveross.util.ClientAdapterPropertiesLoader;

public class ConfigLoader {
	/**
	 * 初始化配置文件加载器
	 * 
	 * @Title: initLoader
	 */
	public static void initLoader() {
		// 系统默认的配置文件(必须加载)
		ConfigContainer.getInstance().register(DefaultPropertiesLoader.class);
		ConfigContainer.getInstance().register(HBasePropertiesLoader.class);
		ConfigContainer.getInstance().register(ProxyipProperties.class);
//		ConfigContainer.getInstance().register("com.foreveross.proxyip.ProxyipProperties");
		ConfigContainer.getInstance().register(QuartzPropertiesLoader.class);
		ConfigContainer.getInstance().register(CityPinyinProperties.class);
		ConfigContainer.getInstance().register(EnginePropertiesLoader.class);
		ConfigContainer.getInstance().register(SystemPropertiesLoader.class);

		//加载渠道配置
		ConfigContainer.getInstance().register(KayakChannelPropertiesLoader.class);
		ConfigContainer.getInstance().register(XieChengChannelPropertiesLoader.class);
		
		//加载节点适配器版本配置
		ConfigContainer.getInstance().register(ClientAdapterPropertiesLoader.class);
	}
}
